@use '@scss/common' as *;

.blockWrapper {
  background-color: var(--theme-bg);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  pointer-events: none;
  overflow-x: hidden;

  @include mid-break {
    padding-top: 4rem !important;
    min-height: 800px;
  }
}

.wrapper {
  align-items: center;
  pointer-events: none;
  z-index: 2;

  @include mid-break {
    row-gap: 2rem;
    align-items: flex-start;
  }
}

.sidebar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  z-index: 10;
  pointer-events: all;

  @include mid-break {
    gap: 1rem;
  }
}

.richText {
  & > * {
    margin-block: 2rem;
  }

  h1 {
    width: 150%;

    @include mid-break {
      width: 100%;
    }
  }

  h6 {
    text-transform: uppercase;
  }
}

.linksWrapper {
  width: 100%;
  position: relative;
  pointer-events: all;

  & > * {
    border-top: 1px solid var(--theme-border-color);
    &:last-child {
      border-bottom: 1px solid var(--theme-border-color);
    }
  }
}

.description {
  margin-bottom: 2rem;
}

.link {
  width: 100%;

  border-bottom: none;

  &:last-of-type {
    border-bottom: 1px solid var(--theme-elevation-200);
  }
}

.graphicWrapper {
  display: flex;
  position: relative;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  height: 100%;
  z-index: 2;

  @include mid-break {
    padding-top: 2rem;
    width: calc(var(--column) * 8);
    position: relative;
  }
}

.createPayloadApp {
  display: flex;
  justify-content: space-between;
  padding: 1.5rem;
  width: 100%;
  @include code;

  @include mid-break {
    padding: 1rem;
  }
}

.backgroundGradient {
  position: fixed;

  &::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 1) 100%);
    z-index: 1;
  }
}

@keyframes spin {
  0% {
    left: calc(0% - 1rem);
    transform: rotate(0deg);
  }

  25% {
    left: calc(0% - 1rem);
    transform: rotate(180deg);
  }

  50% {
    left: calc(-100% + 1rem);
    transform: rotate(180deg);
  }
  75% {
    left: calc(-100% + 1rem);
    transform: rotate(360deg);
  }
  100% {
    left: calc(0% - 1rem);
    transform: rotate(360deg);
  }
}

@keyframes fade-in-up {
  0% {
    opacity: 0;
    transform: translateY(1rem);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.announcementLink {
  display: inline-block;
  width: fit-content;
  position: relative;
  padding: 1px;
  border-radius: 0.5rem;
  overflow: hidden;
  transition: box-shadow 0.2s ease-out;
  box-shadow: 0 0.25rem 1rem -0.75rem var(--theme-success-250);
  animation: fade-in-up 1s ease-out forwards;
  opacity: 0;
  transform: translateY(1rem);
  animation-delay: 1s;
  z-index: 2;

  @include mid-break {
    margin-bottom: 0;
  }

  &::before {
    content: '';
    display: block;
    width: 200%;
    height: auto;
    aspect-ratio: 1;
    position: absolute;
    margin: 0;
    background-image: conic-gradient(
      var(--theme-success-150),
      var(--theme-success-150) 70%,
      var(--theme-success-250) 80%,
      var(--theme-elevation-750)
    );
    animation: spin 10s linear infinite;
    transform-origin: center;
    z-index: -1;
    translate: 0 calc(-50% + 1rem);
    opacity: 0.5;
    transition: opacity 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  }

  &:hover {
    box-shadow: 0 0.25rem 1rem var(--theme-success-100);

    &::before {
      opacity: 1;
    }
  }

  a {
    @include small;
    & {
      font-size: 16px;
      border-bottom: none;
      display: inline-flex;
      text-decoration: none;
      cursor: pointer;
      transition: color 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
      position: relative;
      color: var(--theme-elevation-750);
      padding: 0.375rem 0.75rem;
      background-color: var(--theme-success-50);
      border-radius: calc(0.5rem - 1px);
      z-index: 1;
    }

    &:hover {
      color: var(--theme-elevation-1000);
    }

    &::after {
      content: url('/images/link-arrow.svg');
      margin-left: 0.5rem;
    }

    &:hover,
    &:focus {
      opacity: 1;
    }
  }
}
